<!DOCTYPE html>
<html ng-app="mylife.app">
<head>
<meta charset="UTF8">
<meta name="viewport" content="width=1024">
<title>mylife-home-ui</title>

<script src="lib/jquery/jquery.js"></script>
<script src="lib/jquery/jquery-ui.js"></script>
<link rel="stylesheet" href="lib/jquery/themes/smoothness/jquery-ui.css">
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular/angular-resource.js"></script>
<script src="lib/angular/angular-route.js"></script>
<script src="lib/angular/ui-bootstrap-tpls.js"></script>
<script src="/socket.io/socket.io.js"></script>

<script src="app/app.js"></script>
<script src="app/tools.js"></script>
<script src="app/net.js"></script>
<script src="app/api.js"></script>
<script src="app/controllers.js"></script>
<script src="app/uihelper.js"></script>

<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css">
<!--  <link rel="stylesheet" href="lib/bootstrap/css/bootstrap-theme.css">  -->

<link rel="stylesheet" href="css/app.css">

<script type="text/ng-template" id="window.html">
	<div class="offline"  ng-show="!connected()">
		<img src="images/offline.png"></img>
	</div>
	<div ng-show="connected()">
		<img class="window" src="{{ window.image }}"></img>
		<div class="command" ng-repeat="command in window.commands" ng-style="{ 'left':command.x, 'top':command.y }">
			<button class="btn btn-default command" input-handler="{'s': command.primaryAction, 'l': command.secondaryAction, 'ss': command.secondaryAction }">
				<img class="command" src="{{ command.image() }}"></img>
			</button>
		</div>
		<div class="text" ng-repeat="text in window.texts" ng-style="{ 'left':text.x, 'top':text.y }">
			<span ng-style="text.style()">{{text.value()}}</span>
		</div>
	</div>
</script>

<script type="text/ng-template" id="popup.html">
	<div class="panel panel-primary">
		<div class="panel-heading text-center">
			<h3 class="panel-title">{{ window.displayName }}</h3>
		</div>
		<div class="panel-body text-center">
			<div class="popup center-block" ng-include="'window.html'">
			</div>
		</div>
	</div>
</script>

</head>
<body>
	<div class="main" ng-view>
	</div>
</html>
